{
  "name"    : "Feedreader config.json",

  "include" :
  [
    {
      "path" : "${QOOXDOO_PATH}/tool/data/config/application.json"
    },
    {
      "path" : "image.json"
    },
    {
      "path" : "${QOOXDOO_PATH}/tool/data/config/image.json",
      "as"   : "image"
    }
  ],

  "default-job" : "source",

  "let" :
  {
    "APPLICATION"  : "feedreader",
    "QOOXDOO_PATH" : "../..",
    "QXTHEME"      : "qx.theme.Indigo",
    "LOCALES"      : ["en", "de", "es", "fr", "it", "nl", "sv", "ro", "cs"],
    "ROOT"         : "."
  },

  "config-warnings" :
  {
    "job-shadowing" :
    [
      "common",
      "build-script",
      "image-combine",
      "libraries",
      "simulation-build",
      "simulation-run",
      "translation"
    ],

    "environment" : [ "non-literal-keys" ]
  },


  "jobs" :
  {
    "libraries" :
    {
      "library" :
      [
        {
          "manifest" : "${QOOXDOO_PATH}/component/library/versionlabel/Manifest.json"
        }
      ]
    },

    "common" :
    {
      "environment" :
      {
        "qx.nativeScrollBars" : true
      },

      "compile-options" :
      {
        "paths" : { "scripts-add-hash" : true },
        "uris"  : { "add-nocache-param": false }
      },

      "packages" :
      {
        "separate-loader"  : true,
        "i18n-as-parts"    : true,
        "parts" :
        {
          "boot":
          {
            "include" : ["${QXTHEME}", "feedreader.Application"]
          },
          "settings":
          {
            "include" : ["feedreader.view.desktop.PreferenceWindow"]
            //,"expected-load-order" : 1
          },
          "addfeed":
          {
            "include" : ["feedreader.view.desktop.AddFeedWindow"]
            //,"expected-load-order" : 1
          }
        },
        "sizes" :
        {
          "min-package" : 10
        }
      }
    },

    // "Common" job is too late for these
    "build-script" :
    {
      "compile-options" :
      {
        //"code" : { "format" : true }
      }
    },

    "translation" :
    {
      "translate" : { "poentry-with-occurrences" : false  }
    },

    // Some logging example jobs

    "source-with-dot" :
    {
      "extend" : ["source", "log-dependencies-dot"]
      // override the default root class for the dot diagram
      ,"log" : { "dependencies" : { "dot" : { "root" : "feedreader.view.desktop.PreferenceWindow" }}}
    },

    "source-with-translations" : {
      "extend" : ["source"],
      "log" : { 
        "filter" : { "debug" : ["generator.code.CodeGenerator.printTranslationStats"] },
        "translations" : { "untranslated-keys" : { "skip-locales" : [ "C", "en" ] }}
      }
    },

    // -- Website App -----------------------------------------------------------

    "source-website" :
    {
      "extend" : ["source"],
      "let" :
      {
        "APPLICATION_MAIN_CLASS" : "${APPLICATION}.WebsiteApplication"
      },

      "compile-options" :
      {
        "paths" : { "file" : "source/script/${APPLICATION}-website.js" }
      },

      "=packages" : {}
    },


    "build-website" :
    {
      "extend" : ["build"],
      "let" :
      {
        "APPLICATION_MAIN_CLASS" : "${APPLICATION}.WebsiteApplication",
        "BUILD_PATH" : "build-website"
      },

      "compile-options" :
      {
        "paths" : {
          "file" : "build-website/script/${APPLICATION}.js",
          "scripts-add-hash" : false
        }
      },

      "copy-files" :
      {
        "files" :
        [
          "index.html"
        ],

        "source" : "${ROOT}/source/resource/website/",
        "target" : "${BUILD_PATH}"
      },

      "=packages" : {}
    },



    // -- Mobile App -----------------------------------------------------------

    "source-mobile" :
    {
      "extend" : ["source"],
      "let" :
      {
        "APPLICATION_MAIN_CLASS" : "${APPLICATION}.MobileApplication"
      },

      "environment" :
      {
        "qx.mobile.emulatetouch" : true
      },

      "compile-options" :
      {
        "paths" : { "file" : "source/script/${APPLICATION}-mobile.js" }
      },

      "=packages" : {}
    },


    "build-mobile" :
    {
      "extend" : ["build"],
      "let" :
      {
        "APPLICATION_MAIN_CLASS" : "${APPLICATION}.MobileApplication",
        "BUILD_PATH" : "build-mobile"
      },

      "environment" :
      {
        "qx.mobile.emulatetouch" : true
      },

      "compile-options" :
      {
        "paths" : {
          "file" : "build-mobile/script/${APPLICATION}.js",
          "scripts-add-hash" : false
        }
      },

      "copy-files" :
      {
        "files" :
        [
          "index-ios.html",
          "index.html"
        ],

        "source" : "${ROOT}/source/resource",
        "target" : "${BUILD_PATH}"
      },

      "=packages" : {}
    },


    // -- Simulation Jobs ------------------------------------------------------

    "simulation-run" :
    {
      "environment" :
      {
        "simulator.selServer"   : "${SELENIUM_SERVER}",
        "simulator.selPort"     : "${SELENIUM_PORT}",
        "simulator.testBrowser" : "${SELENIUM_BROWSER}",
        "simulator.autHost"     : "${AUT_HOST}",
        "simulator.autPath"     : "${AUT_PATH}",
        "simulator.reportServer": "${SIMULATOR_REPORTSERVER}",
        "simulator.applicationLog" : true,
        "simulator.globalErrorLogging" : true
      }
    },

    "simulation-build" :
    {
      "let" :
      {
        "SIMULATION_INCLUDE" : "feedreader.simulation.ria.*"
      }
    },

    "simulation-build-mobile" :
    {
      "extend" : ["simulation-build"],

      "let" :
      {
        "SIMULATION_INCLUDE" : "feedreader.simulation.mobile.*"
      }
    },

    // -- Image Jobs ------------------------------------------------------

    "image-combine" :
    {
      "extend" : ["image::combining"]
    }
  }
}
